import java.util.*;
public class Solution {
    public int Add(int num1,int num2) {
while ((num1 & num2)!=0){
    int a = num1 ^ num2;
    int b =(num1 & num2) << 1;
    num1 =a;
    num2 = b;
}
return num1 ^ num2;
    }
    public  void  st(){
        Add(1,2);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        Solution solution = new Solution();
        System.out.println(solution.Add(a,b));

    }
}